add_library(MathFunctions mySqrt.cxx)  #一行代码创建一个静态库 
#add_library(<name> [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [source1] [source2] [...])

target_include_directories(MathFunctions
          INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
          PUBLIC   ${PROJECT_BINARY_DIR} 
          )     

install(TARGETS MathFunctions DESTINATION lib)
install(FILES MathFunctions.h DESTINATION include)          